package com.cx.mall.seckill.controller;

import com.cx.mall.common.entity.seckill.entity.SeckillActivity;
import com.cx.mall.common.util.ResponseVo;
import com.cx.mall.seckill.service.ISeckillActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zs
 * @since 2025-08-07
 */
@RestController
@RequestMapping("/seckill/activity")
public class SeckillActivityController {
    @Autowired
    private ISeckillActivityService seckillActivityService;

    @GetMapping("/list")
    public ResponseVo list(){

        List<SeckillActivity> list = seckillActivityService.limitList();

        return ResponseVo.success(list);
    }


    @GetMapping("/listAllByToday")
    public ResponseVo  listAllByToday() {
        List<SeckillActivity> list = seckillActivityService.listAllByToday();
        return ResponseVo.success(list);
    }

}
